<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'bookInfo.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	
	<link rel="stylesheet" type="text/css" href="images/main.css">
	
	<script type="text/javascript" src="images/jquery.js"></script>

  </head>
  
  <body>
			<table class="table_style" cellpadding="3" cellspacing="1" border="0">
			<s:set var="datat" value="#{0:'图书',1:'光盘',2:'期刊'}"/>
			<s:if test="book.dataType!=2">
			<!-- 如果不是期刊 -->
				<tr>
				<td class="td_sty">名称</td><td class="td_sty2"><s:property value="book.bookName"/></td>
				<td class="td_sty">索书号</td><td class="td_sty2"><s:property value="book.bookCallNo"/></td></tr>
				<tr>
				<td class="td_sty">条码号</td><td class="td_sty2"><s:property value="book.bookBarCode"/></td>
				<td class="td_sty">典藏地</td><td class="td_sty2"><s:property value="book.bookCollection"/></td></tr>
				<tr>
				<td class="td_sty">典藏类型</td><td class="td_sty2"><s:property value="#datat[book.dataType]"/></td>
				<td class="td_sty">责任人</td><td class="td_sty2"><s:property value="book.bookChargePerson"/></td></tr>
				<tr>
				<td class="td_sty">出版社</td><td class="td_sty2"><s:property value="book.bookPublishing"/></td>
				<td class="td_sty">出版时间</td><td class="td_sty2"><s:property value="book.bookPublishingTime"/></td></tr>
				<tr>
				<td class="td_sty">ISBN</td><td class="td_sty2"><s:property value="book.ISBN"/></td>
				<td class="td_sty">光盘</td><td class="td_sty2">
				<s:if test="book.bookDisk==null">
					暂无光盘
				</s:if><s:else>
					<a target="_blank" href="queryBook?op=info&id=<s:property value="book.bookDisk.bookId"/>"><s:property value="book.bookDisk.bookName"/></a>
				</s:else>
				</td></tr>
				<tr>
				<td class="td_sty">单价(元)</td><td class="td_sty2"><s:property value="book.bookPrice"/></td>
				<td class="td_sty">数量(借出/在库)</td><td class="td_sty2"><s:property value="book.bookLoanCount"/>/<s:property value="book.bookCount"/></td></tr>
				</s:if><s:else>
				<!-- 是期刊 -->
				<tr>
				<td class="td_sty">名称</td><td class="td_sty2"><s:property value="book.bookName"/></td>
				<td class="td_sty">类型</td><td class="td_sty2"><s:property value="book.periType"/></td></tr>
				<tr>
				<td class="td_sty">期刊号</td><td class="td_sty2"><s:property value="book.periNo"/></td>
				<td class="td_sty">典藏地</td><td class="td_sty2"><s:property value="book.bookCollection"/></td></tr>
				<tr>
				<td class="td_sty">典藏类型</td><td class="td_sty2"><s:property value="#datat[book.dataType]"/></td>
				<td class="td_sty">责任人</td><td class="td_sty2"><s:property value="book.bookChargePerson"/></td></tr>
				<tr>
				<td class="td_sty">出版社</td><td class="td_sty2"><s:property value="book.bookPublishing"/></td>
				<td class="td_sty">期数</td><td class="td_sty2"><s:property value="book.perPeriods"/></td></tr>
				<tr>
				<td class="td_sty">ISBN</td><td class="td_sty2"><s:property value="book.ISBN"/></td>
				<td class="td_sty">光盘</td><td class="td_sty2">
				<s:if test="book.bookDisk==null">
					暂无光盘
				</s:if><s:else>
					<a target="_blank" href="queryBook?op=info&id=<s:property value="book.bookDisk.bookId"/>"><s:property value="book.bookDisk.bookName"/></a>
				</s:else>
				</td></tr>
				<tr>
				<td class="td_sty">年价(元)</td><td class="td_sty2"><s:property value="book.bookPrice"/></td>
				<td class="td_sty">数量(借出/在库)</td><td class="td_sty2"><s:property value="book.bookLoanCount"/>/<s:property value="book.bookCount"/></td></tr>
				
				</s:else>
				<tr><td class="td_sty"></td><td colspan="3" style="background-color:#fefefe;padding-left:10px"><input type="button" value="关闭" class="buttons" onclick="window.close()"/></td></tr>
			</table>
  </body>
</html>
